﻿<Window x:Class="Blazonisation.Forms.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Blazonisation" 
        ResizeMode="CanResize"
        BorderThickness="0" 
        Width="800" Height="600"
        MinWidth="800" MinHeight="600"
        WindowStartupLocation="CenterScreen"
        SizeChanged="On_MainWindow_SizeChanged"
        WindowState="Normal"
        Loaded="On_MainWindow_Loaded">
    <!--<Viewbox Stretch="None" Name="viewBox" StretchDirection="Both">-->

    <Grid>
        <!--Width="800" Height="600"-->
        <Grid.Background>
            <LinearGradientBrush StartPoint="0,0.3" EndPoint="1,0">
                <LinearGradientBrush.GradientStops>
                    <GradientStop Color="#F2F7FF" Offset="0" />
                    <GradientStop Color="#EFE8FF" Offset="0.1" />
                    <GradientStop Color="#FFFFFF" Offset="0.3" />
                    <GradientStop Color="#EFE8FF" Offset="0.5" />
                    <GradientStop Color="#EFE8FF" Offset="0.6" />
                    <GradientStop Color="#EFE8FF" Offset="0.8" />
                    <GradientStop Color="#FFFFFF" Offset="1" />
                </LinearGradientBrush.GradientStops>
            </LinearGradientBrush>
        </Grid.Background>

        <Image Name="imgGriffon"
               Source="..\Images\Griffon.png" 
               Stretch="Fill" 
               Margin="140,120,140,120" 
               StretchDirection="Both" 
               OpacityMask="White" 
               Opacity="0.5" 
               HorizontalAlignment="Center" 
               VerticalAlignment="Center" 
               Width="400" Height="300"
            />
        <Rectangle Name="leftLine" 
                   HorizontalAlignment="Left" 
                   Margin="40,0,0,0" 
                   Width="7" 
                   Stroke="Red" 
                   Fill="Red" />
        <Rectangle Name="bottomLine" 
                   VerticalAlignment="Bottom" 
                   Margin="0,0,0,40" 
                   Height="7" 
                   Stroke="Red" 
                   Fill="Red"  />

        <!-- ==============   Menu ================ -->
        <Menu Name="MainMenu" Height="25" VerticalAlignment="Top" >
            <Menu.Background>
                <LinearGradientBrush>
                    <GradientStop Color="#BE3232" Offset="0" />
                    <GradientStop Color="White" Offset="0.9" />
                    <GradientStop Color="#A54646" Offset="1" />
                </LinearGradientBrush>
            </Menu.Background>
            <MenuItem Header="File">
                <MenuItem Header="Open" Name="miOpen" Click="On_miOpen_Click"/>
                <MenuItem Header="Save result" Name="miSaveResult" IsEnabled="False" Click="On_miSaveResult_Click"/>
                <Separator />
                <MenuItem Header="Exit" Name="miExit" Click="On_miExit_Click"/>
            </MenuItem>
            <MenuItem Header="Tamplates manager" Name="miTemplatesManager" Click="On_miManageTemplates_Click">

            </MenuItem>
            <MenuItem Header="Help">
                <MenuItem Header="Help" Name="miHelp" Click="On_miHelp_Click"/>
                <Separator />
                <MenuItem Header="About program" Name="miAbout"/>
            </MenuItem>
        </Menu>
        <!-- ===================== Controls  ==============================-->

        <Border Name="brdEmblemHolder"
                BorderBrush="DarkRed"
                BorderThickness="10"
                CornerRadius="5"
                Margin="0" 
                Visibility="Hidden" 
                HorizontalAlignment="Center" 
                VerticalAlignment="Center"
                Width="400" Height="400" 
                MouseLeftButtonDown="On_brdEmblemHolder_MouseLeftButtonDown"
            >
            <Border.BitmapEffect>
                <DropShadowBitmapEffect />
            </Border.BitmapEffect>
            <Image Name="imgEmblemHolder" 
                   Stretch="Fill"  
                   StretchDirection="Both" 
                   Visibility="Hidden" 
                   ToolTip="Click to start recognition" 
                   HorizontalAlignment="Left"
                   MouseDown="On_imgEmblemHolder_MouseDown"                   
                />
        </Border>

        <!-- =========  Emblems Constructive Parts ================== -->
        <Border
            Name="brdShieldHolder"
                BorderBrush="DarkRed"
                BorderThickness="10"
                CornerRadius="5"                
                Visibility="Visible" 
                Height="102" 
                Width="104" 
                Margin="-150,5,0,0" 
                HorizontalAlignment="Left" 
                VerticalAlignment="Top">
            <Image Name="imgShield" Source="..\Images\Shield.png" Opacity="1" ToolTip="Shield's shape"/>
            <!--<Image Name="imgLoading" Source="..\Images\Loading.gif"/>-->

        </Border>
        <TextBlock Name="tbShieldForm"
               Margin="-200, 5, 0, 0"
               HorizontalAlignment="Left"
               VerticalAlignment="Top"
               Text="Shield form info"
               TextWrapping="Wrap"
            ></TextBlock>

        <Border
                Name="brdColorsHolder"
                BorderBrush="DarkRed"
                BorderThickness="10"
                CornerRadius="5"
                Margin="-150,150,0,0" 
                Visibility="Visible" 
                HorizontalAlignment="Left" 
                VerticalAlignment="Top"
                Width="104" 
                Height="102" 
                >
            <Image Name="imgColors" Source="..\Images\Colors.png" Opacity="1" ToolTip="Shield's colors"/>
        </Border>
        <TextBlock Name="tbColors"
               Margin="-200, 150, 0, 0"
               HorizontalAlignment="Left"
               VerticalAlignment="Top"
               Text="Colors info"
               TextWrapping="Wrap"
            ></TextBlock>

        <Border
                Name="brdDevisionHolder"
                BorderBrush="DarkRed"
                BorderThickness="10"
                CornerRadius="5"
                Margin="-150,270,0, 0"
                Visibility="Visible" 
                VerticalAlignment="Top" 
                HorizontalAlignment="Left" 
                Height="102"                 
                Width="104">
            <Image Name="imgDevision" Source="..\Images\Devision.png" Opacity="1" ToolTip="Shield's devisions"/>
        </Border>
        <TextBlock Name="tbDevisions"
               Margin="-200, 270, 0, 0"
               HorizontalAlignment="Left"
               VerticalAlignment="Top"
               Text="Devisions info"
               TextWrapping="Wrap"
            ></TextBlock>

        <Border
                Name="brdFiguresHolder"
                BorderBrush="DarkRed"
                BorderThickness="10"
                CornerRadius="5"
                Margin="-350,400,0,0" 
                Visibility="Visible" 
                VerticalAlignment="Top" 
                Height="102" 
                HorizontalAlignment="Left" 
                Width="312">
            <StackPanel Orientation="Horizontal">
                <Image Name="imgFigures" Source="..\Images\Figures.png" Opacity="1" ToolTip="Shield's honor figures" Width="100" Height="100"/>
                <Image Name="imgFigures2" Source="..\Images\Figures.png" Opacity="0.5" ToolTip="Possible figures" Width="80" Height="70" VerticalAlignment="Bottom" />
                <Image Name="imgFigures3" Source="..\Images\Figures.png" Opacity="0.5" ToolTip="Possible figures" Width="80" Height="70" VerticalAlignment="Bottom" />
            </StackPanel>
        </Border>
        <TextBlock Name="tbFigures"
               Margin="-200, 400, 0, 0"
               HorizontalAlignment="Left"
               VerticalAlignment="Top"
               Text="Figures info"
               TextWrapping="Wrap"                   
            ></TextBlock>

        <Button Height="35" 
                HorizontalAlignment="Right" 
                Margin="0,0,23,66" 
                Name="btnContinueRecognition" 
                VerticalAlignment="Bottom" 
                Width="142" 
                Click="On_btnContinueRecognition_Click"                 
                Foreground="Black" 
                BorderThickness="3" 
                Visibility="Visible"                 
                Opacity="0">
            Continue recognition
        </Button>
        <!--Background="DarkRed"-->
        <!-- ==============   Reflection recognition state ================= -->
        <Label Height="28" Margin="130,0,0,5" Name="lblState" VerticalAlignment="Bottom" Visibility="Hidden">Recognition state : Ready.</Label>
    </Grid>
    <!--</Viewbox>-->
</Window>